/**
 * Created by Administrator on 2017/10/17.
 */

var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');

var Schema = mongoose.Schema;

var ObjectId = Schema.ObjectId;

var CommentSchema = new Schema({
	name:String,
	content: String,
	cateId: ObjectId,
	commentNum:Number,
	date:{type:Date,default:Date.now},//传入时间，该时间为当前时间
})

CommentSchema.plugin(mongoosePaginate);

module.exports = mongoose.model('Comment',CommentSchema,'comment');